<%@page import="com.metagurukul.metagranth.vo.User"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"
	import="java.util.ArrayList,com.metagurukul.metagranth.vo.Question"%>

<jsp:include page="header.jsp"></jsp:include>

<%
	if (request.getAttribute("userProfile") == null) {
		request.getRequestDispatcher("profile.do").forward(request,
				response);
	} else {
		User user = (User) request.getAttribute("userProfile");
%>
<div style="">
	<table	style="width: 95%; border-collapse: collapse;">
		<tr>
			<td colspan="2">&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2" class="question-header">Profile</td>
		</tr>
		<tr>
			<td colspan="2" height="50px" valign="top"><hr /></td>
		</tr>
		<tr>
			<td style="text-align: left; padding: 7px;" width="150px">&nbsp;UserName :</td>
			<td>
				<%
					out.print(user.getUsername());
				%>
			</td>
		</tr>
		<tr>
			<td style="text-align: left; padding: 7px;">&nbsp;Name :</td>
			<td>
				<%
					if (user.getName() == null) {
							out.print("Not Specified");
						} else if (user.getName().trim().isEmpty()) {
							out.print("Not Specified");
						} else {
							out.print(user.getName());

						}
				%>
			</td>
		</tr>

		<tr>
			<td style="text-align: left; padding: 7px;">&nbsp;Age :</td>
			<td>
				<%
					if (user.getAge() == 0) {
							out.print("Not Specified");
						} else {
							out.print(user.getAge());
						}
				%>
			</td>
		</tr>
		<tr>
			<td style="text-align: left; padding: 7px;">&nbsp;Last Login
				Date :</td>
			<td><%=user.getLastlogindate()%></td>
		</tr>
<tr>
			<td colspan="2" height="50px">&nbsp;</td>
		</tr>

	</table>
</div>
<%
	}
%>



<jsp:include page="footer.jsp"></jsp:include>